export interface ResponseData {
    status: number
    success?: {
        message: string
    }
    error?: {
        message: string
        code: number
    }
}

//------------------------------------------------
// 1. 出入库和库存表
//------------------------------------------------
export interface InboundAndOutbound {
    start_date: string
    end_date: string
    trend: boolean
    handle_id: number | ''
    group_id: number | ''
}

export interface Table1 {
    actual_date_str: string
    handle_name: string
    big_name: string
    no: string
    small_name: string
    model: string
    units: string
    change_abs: number
    unit_price: number
    total_abs: number
    remarks: string
}
export interface InboundAndOutboundResponseData extends ResponseData {
    list: Table1[]
}



//------------------------------------------------
// 2. 出入库和库存表（按照供应商或者领用方排序）
//------------------------------------------------
export interface InboundAndOutboundAndHandle {
    start_date: string
    end_date: string
    trend: boolean
    handle_id: number | ''
    group_id: number | ''
}
export interface Table2 {
    actual_date_str: string
    handle_name: string
    big_name: string
    no: string
    small_name: string
    model: string
    units: string
    change_abs: number
    unit_price: number
    total_abs: number
    place: string
    remarks: string
}
export interface InboundAndOutboundAndHandleResponseData extends ResponseData {
    list: Table2[]
}

//------------------------------------------------
// 3. 出入库的数量，金额，库存
//------------------------------------------------
export interface InboundAndOutboundAndInventory {
    start_date: string
    end_date: string
    handle_class: number[]
}
// export interface Table3 {
//     big_name: string
//     in_number: number
//     in_amount: number
//     out_number: number
//     out_amount: number
//     now_number: number
//     now_amount: number
// }
export interface InboundAndOutboundAndInventoryResponseData extends ResponseData {
    data: {
        table_head: any
        result: any
    }
}

//------------------------------------------------
// 4. 自定义导出 携带参数
//------------------------------------------------
export interface DIYFileCRUD {
    mode: 'create' | 'delete' | 'update' | 'read'
    create?: {
        name: string
    }
    delete?: {
        delete_id: number
    }
    update?: {
        export_id: number
        update_id_list: number[]
        name: string
    }
    read?: {}
}

export interface DIYFileDate {
    id: number
    name: string
    content: DIYContent[]
    id_list: number[]
}

export interface DIYContent {
    id: number
    no: string
    big_name: string
    small_name: string
    units: string
    number: number
}

// 自定义导出 返回参数
export interface DIYFileCRUDResponseData extends ResponseData {
    create?: {}
    delete?: {}
    update?: {}
    read?: {
        data: DIYFileDate[]
    }
}

// 返回表格选项 携带参数
export interface DIYReturnData {
    export_id: number
    date_start: string
    date_stop: string
    trend: boolean
}


// 返回表格选项 返回参数
export interface DIYReturnDataResponseData extends ResponseData {
    data: Table4[]
}


// 表格类型
export interface Table4 {
    actual_date_str: string
    handle_name: string
    big_name: string
    no: string
    small_name: string
    model: string
    units: string
    change: number
    unit_price: number
    total: number
    remarks: string
}



//------------------------------------------------
// 5. 总表导出
//------------------------------------------------
export interface SummaryTable {}


//------------------------------------------------
// 6. 选中出入库记录导出
//------------------------------------------------
export interface InboundList {
    data: InboundListData[]
    handle_name: string
    date: string
}
export interface InboundListData {
    small_name: string
    model: string
    units: string
    change: string
    unit_price: string
    total: string
}